<template>
    <el-pagination
            class="el-dialog__footer"
            style="padding-bottom: 0;"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="common.pageNo"
            :page-sizes="common.pageSizes"
            :page-size="common.pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="common.total">
    </el-pagination>
</template>

<script>
    import {mapState} from 'vuex';
    export default {
        computed:{
            ...mapState(['common'])
        },
        methods:{
            handleSizeChange(val){
                this.common.pageSize = val;
                this.common.pageNo = 1;
                this.$store.dispatch('loadTable');
            },
            handleCurrentChange(val){
                this.common.pageNo = val;
                this.$store.dispatch('loadTable');
            },
        },
    }
</script>

<style scoped>

</style>